#include "mozart.h" 

OZ_BI_define(BIgetenv,1,1) 
{ 
  OZ_declareAtom(0,envVarName); 

  char *envValue = getenv(envVarName); 

  if (envValue == 0) /* not defined in environment */
    return OZ_FAILED; 

  OZ_RETURN_ATOM(envValue); 
} OZ_BI_end 


static OZ_C_proc_interface oz_interface[] = { 
  {"getenv",1,1,BIgetenv}, 
  {0,0,0,0} 
}; 

OZ_C_proc_interface *oz_init_module() { 
  return oz_interface; 
} 

